package com.sugon.controller.sys;

import com.sugon.service.SysProcessInfoService;
import com.sugon.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 系统业务流程信息Controller
 *
 * @author YuXD
 * @date 2020-08-30 17:23
 */
@Controller
@RequestMapping("sysProcess")
public class SysProcessInfoController {

    @Autowired
    private SysProcessInfoService processInfoService;

    /**
     * 根据业务ID获取对应的审批流程信息
     */
    @RequestMapping("/approve")
    @ResponseBody
    public R list(@RequestParam String bussinessId) {
        return R.ok().put("approveProcessList", processInfoService.getApproveList(bussinessId));
    }

}
